package cc.realxyq.demo.config;

import cc.realxyq.demo.dao.BookDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author kwhan
 * @date 2022年01月09日 5:42
 */
@Slf4j
@Configuration
@ComponentScan({"cc.realxyq.demo.service","cc.realxyq.demo.dao"})
public class AutoWiredConfig {

    @Bean
    public BookDao bookDao2(){
        BookDao bookDao = new BookDao();
        bookDao.setLabel(2);
        return bookDao;
    }
}
